import axios from "axios";
// 使用mockjs生成随机假数据
// 如果不需要mock假数据,只需要注释下方这行代码
import './mock';

const request = axios.create(
	{
		// 设置路径
		baseURL: 'http://localhost:4200',
		timeout: 5000,
		responseType: 'json'
	}
)
// 获取用户数据
export const getUserById = id => request.get('/api/getUserById', {params: {id}});
// 获取左侧导航
export const getNavTree = () => request.get('/api/getNavTree');
// 获取动态切片值
export const getSliceData = () => request.get('/api/getSliceData');
// 保存动态切片值
export const saveSliceData = data => request.post('/api/saveSliceData', {data});
// 获取切片等值线工况
export const getSliceCondition = () => request.get('/api/getSliceCondition');
// 获取等值线标注列表
export const getDzxListById = id => request.get('/api/getDzxListById',{params:{id}});
// 修改设置
export const saveSettings = data => request.post('/api/modifySetting',{data});
// 删除设置
export const deleteSettings = id => request.get('/api/deleteSettings',{params:{id}});
// 删除等值线
export const deleteDzLine = id => request.get('/api/deleteDzLine',{params:{id}});
// 修改标注值
export const saveBzValue = data => request.post('/api/saveBzValue',{data});

